Typically, when an operating system command is used to configure a network device such as a router, a parser processes the command using a binary parse tree. The router is configured as specified in the operating system command based on information derived from the parsing. The data used to configure the router is stored in a system configuration database. After numerous operating system commands have been processed, the format of the system configuration database does not readily reveal the format of the commands.
Frequently, it is necessary to access the information in the system configuration database and reconstruct the command or commands that were used to configure the router. This can be a formidable problem that requires significant time to execute.
As a demonstration of the problem, consider binary parse tree 100 of FIG. 1. Binary parse tree 100 is an example of a parse tree that may be used in an operating system of a router in processing configuration commands. At each of nodes 101 to 119, there can be zero, one, or two branches. The path that terminates at each of the end nodes of binary parse tree 100 represents a configuration state for the router. The particular configuration state obtained when the configuration command represented by binary parse tree 100 is executed is stored in the system configuration database.
To regenerate the original configuration command, the information in the system configuration database was used and each route through binary parse tree 100 was tested for validity. For a simple binary parse tree, such as tree 100, this could be done relatively quickly. However, the number of paths grows exponentially/geometrically with the number of tree layers and nodes. Consequently, the execution time required increased significantly as the commands became more complex. Unfortunately, given constraints in router hardware, and due to the complex syntax of configuration commands and the large number of parameter values that they may include, improvements in the execution time would appear to require significant advances in router hardware performance.
Thus, there is a need to determine a reverse path through a parse tree, based on stored configuration information, for the purpose of re-constructing a device configuration command, in a way that overcomes the foregoing disadvantages.